package com.hhp.cloud.shop.search.controller;

import cn.hutool.json.JSONUtil;
import com.hhp.cloud.shop.common.core.result.R;
import com.hhp.cloud.shop.search.service.ShopSearchService;
import com.hhp.cloud.shop.search.vo.SearchParamVo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.naming.directory.SearchResult;

/**
 * @Description: 检索controller
 * @author: hhp
 * @date: 2021/12/8 17:12
 */
@RestController
@RequestMapping("/api/v1/search/search")
@AllArgsConstructor
public class ShopSearchController {

    ShopSearchService shopSearchService;

    @ApiOperation("测试查询")
    @GetMapping
    public R listPage(SearchParamVo searchParamVo){
        return R.ok().setData(shopSearchService.search(searchParamVo));
    }

}
